<!--
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
-->
<html>
<head>
 <title>JsUnit Test Page for Opensocial AS3 Client Library</title>
 <link rel="stylesheet" type="text/css" href="http://www.jsunit.net/runner/css/jsUnitStyle.css">
 <script language="javascript" src="http://www.jsunit.net/runner/app/jsUnitCore.js"></script>
</head>
<body>
  <h1>JsUnit Test Page for Opensocial Actionscript Client SDK</h1>
  <p>This page contains JsUnit tests for the javascripts used in Opensocial Actionscript Client SDK.
     To see them, take a look at the source.
  </p>
  <div id="testBed"></div>
  <script>

    var TESTING = true;

    // Override the jsunit default onload function to postpone the starting of proceess.
    jsUnitSetOnLoad(window, function(){
      isTestPageLoaded = false;
    });

    // Real onload function
    function allScriptsLoaded() {
      isTestPageLoaded = true;
    };

    // Load the isTestUtil code.
    var script = document.createElement("script");
    script.src = top.testManager.getBaseURL() + "opensocial-test-util.js";
    script.type = "text/javascript";
    document.getElementsByTagName("head")[0].appendChild(script);

    // Scripts to test
    var testingScripts = [
      "../src/org/opensocial/client/jswrapper/javascript/opensocial-flashsdk.js",
      "org/opensocial/client/jswrapper/javascript/opensocial-flashsdk-test.js"
    ];

    // Load the spec scripts and testing scripts
    function loadScripts() {
      if (!window.osTestUtil) {
        window.setTimeout(loadScripts, 100);
        return;
      }
      window.osTestUtil.loadScripts(allScriptsLoaded, testingScripts);
    };
    loadScripts();

  </script>
</body>
</html>
